package com.first_javaee.mapper;

import com.first_javaee.entity.UserInfo;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface UserInfoMapper {
    @Select("select * from user_info where user_name=#{userName}"+"and user_pwd=#{userPwd}")
    UserInfo checkLogin(@Param("userName")String user_name, @Param("userPwd")String user_pwd);

    @Insert("insert into user_info(`user_name`,`user_pwd`) value (#{userName},#{userPwd})")
    void addUser(@Param("userName")String user_name, @Param("userPwd")String user_pwd);
}
